package hn.cch.mybatis.service.impl;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public class TransactionServiceImpl {

    /**
     * 支持设置事务回滚异常类型
     */
    @Transactional(
            rollbackFor = {Exception.class, Throwable.class}
    )
    public void test1() {

    }


    /**
     * 嵌套异常
     */
    @Transactional(
            propagation = Propagation.NESTED
    )
    public void test2() {

    }

}
